<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>正则表达式中原子表和原子组的选择符</title>
</head>
<body>
    <script>
        let hd = '1243243215';

        // []原子表，这里表示hd的字符串中是否有4，或者5，或者6，或者7
        let a = /[4567]/;
        console.log(a.test(hd));

        // ()原子组，这里表示hd的字符串中是否有121字符串，或者6574字符串
        let b = /(121|6574)/;
        console.log(b.test(hd));
    </script>
</body>
</html>